.class public Llt/minvib/magicpreferences/MagicIntegerPreference;
.super Llt/minvib/magicpreferences/MagicPreference;
.source "MagicIntegerPreference.java"


# annotations
.annotation system Ldalvik/annotation/Signature;
    value = {
        "Llt/minvib/magicpreferences/MagicPreference<",
        "Ljava/lang/Integer;",
        ">;"
    }
.end annotation


# direct methods
.method public constructor <init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Integer;)V
    .locals 0

    .line 14
    invoke-direct {p0, p1, p2, p3}, Llt/minvib/magicpreferences/MagicPreference;-><init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Object;)V

    return-void
.end method


# virtual methods
.method public get(Landroid/content/Context;)Ljava/lang/Integer;
    .locals 2

    .line 26
    invoke-virtual {p0, p1}, Llt/minvib/magicpreferences/MagicPreference;->getSharedPrefs(Landroid/content/Context;)Landroid/content/SharedPreferences;

    move-result-object p1

    .line 27
    iget-object v0, p0, Llt/minvib/magicpreferences/MagicPreference;->key:Ljava/lang/String;

    iget-object v1, p0, Llt/minvib/magicpreferences/MagicPreference;->drawback:Ljava/lang/Object;

    check-cast v1, Ljava/lang/Integer;

    invoke-virtual {v1}, Ljava/lang/Integer;->intValue()I

    move-result v1

    invoke-interface {p1, v0, v1}, Landroid/content/SharedPreferences;->getInt(Ljava/lang/String;I)I

    move-result p1

    invoke-static {p1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object p1

    return-object p1
.end method

.method public set(Landroid/content/Context;Ljava/lang/Integer;)V
    .locals 1

    .line 19
    invoke-virtual {p0, p1}, Llt/minvib/magicpreferences/MagicPreference;->getSharedPrefs(Landroid/content/Context;)Landroid/content/SharedPreferences;

    move-result-object p1

    .line 20
    invoke-interface {p1}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;

    move-result-object p1

    iget-object v0, p0, Llt/minvib/magicpreferences/MagicPreference;->key:Ljava/lang/String;

    invoke-virtual {p2}, Ljava/lang/Integer;->intValue()I

    move-result p2

    invoke-interface {p1, v0, p2}, Landroid/content/SharedPreferences$Editor;->putInt(Ljava/lang/String;I)Landroid/content/SharedPreferences$Editor;

    move-result-object p1

    invoke-interface {p1}, Landroid/content/SharedPreferences$Editor;->apply()V

    return-void
.end method
